<template>
	<div class="goods-info">
		<p>{{ value.title }}</p>
		<p>
			售价：¥{{ value.endprice }} 成本价：¥{{ value.costprice }} 原价：¥{{
				value.price
			}}
			利润：¥{{
				(parseFloat(value.endprice) - parseFloat(value.costprice)).toFixed(2)
			}}
			库存：{{ value.stock }}
		</p>
	</div>
</template>

<script>
export default {
	name: 'GoodsInfo',
	props: {
		value: {
			type: Object,
			default: () => {
				return {};
			}
		}
	}
};
</script>

<style lang="stylus" scoped></style>
